#include "firstrun.h"
#include "widget.h"
#include <QApplication>
#include <QSettings>
#include <QDebug>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    QSettings *configIniRead = new QSettings("config.ini", QSettings::IniFormat);
    QString remember = configIniRead->value("/Workspace/Remember").toString();
    delete configIniRead;

    if (false == QFile::exists(QDir::currentPath() + "/config.ini") || "false" == remember)
    {
        firstRun form;
        if (form.exec() == QDialog::Accepted)
        {
            Widget w;
            w.show();
            return a.exec();
        }
    }
    else
    {
        Widget w;
        w.show();
        return a.exec();
    }

    return 0;
}
